package com.simulation.superlotto.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.simulation.superlotto.model.User;
import com.simulation.superlotto.model.Winn;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author ：XXX
 * @date ：Created in 2020/12/1
 * @description ：
 * @version: 1.0
 */
@Mapper
public interface WinnDao extends BaseMapper<Winn> {
    @Select("select * from winn where  time like '2020%' ORDER BY num")
    List<Winn> selectTime();
    @Select("select * FROM winn  ORDER BY  num  DESC limit 1")
    Winn selectMaxTime();
    @Select("select * from user where user_name=#{userName}")
    User selectUser(@Param("userName") String userName);
}
